function foo() {
  return "abc";
}
function bar() {
  return 123;
}

// unknow类型只能复制给any和unknow类型
// any 类型可以赋值给任意类型

let flag = true;

let result: unknown; //最好不要使用any
if (flag) {
  result = foo();
} else {
  result = bar();
}

let message1: any = result;
let message2: unknown = result;
// let message3: string = result;
// let message4: number = result;

export {};
